import request from '@/utils/request';

export function   getPointsMall(){
    return request({
        url:'/jsIntegral/shop/list/?pageSize=10&pageNum=1',
        method:'get',
    });
}
export function  getJsIntegral(){
    return request({
        url:'jsIntegral/setting/list',
        method:'get'
    });
}
export  function  getCustomerlists(){
    return request({
        url:'/jsPublicize/page?title=&timeRange=&jsBusinessType=js_style&pageNum=1&pageSize=10',
        method:'get',
        headers:{
            "Authorization": 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjA0OWZiZTQxLWUwNWEtNGQ0Zi1iOWQxLTdmMGY3NjRmNDE3ZCJ9.ducOO90ocTmSUilt9sOMIdnhHqWoBzu9khs1nE_wzncBXjy8O4-8W3ns0n6BKHzlofstdXEMftuKnOHuQ7iTFA'
        }


    });
}

export  function  getEdit(params){
    return request({
        url:`/jsIntegral/shop/updateShop`,
        method:'put',
        data: params,
    });
}
export function getAddShop(data){
    return request({
        url:'/jsIntegral/shop/addShop',
        method:'post',
        data:data
    });
}

export function DeleteShop(ids){
    return request({
        url:`/jsIntegral/shop/${ids}`,
        method: 'delete',


    });
}
export function  getShopId(shopId){
    return request({
        url:`jsIntegral/shop/list/?goodsName=${shopId}&pageSize=10&pageNum=1`,
        method:'get'
    });
}

//兑换积分
export function getExchange(){
    return request({
        url:'jsIntegral/exchange/list?pageSize=10&pageNum=1',
        method:'get',

    });
}
export function getExchangeNum(pageNum){
    return request({
        url:`jsIntegral/exchange/list?pageSize=10&pageNum=${pageNum}`,
        method:'get',

    });
}
export function getVerification(data){
    return request({
        url:'/jsIntegral/exchange/verification',
        method:'post',
        data:data
    });
}
//搜索
export function getShopName(params){
    return request({
        url:`jsIntegral/exchange/list?pageSize=10&pageNum=1&exchangeShopName=${params.exchangeShopName}&exchangeIsVerification=${params.exchangeIsVerification}&exchangeKey=${params.exchangeKey}`,
        method:'get',

    });
}
